package Java.Thread;

//线程
public class Main {
    public static void main(String[] args) {
        //lambda表达式创建线程
        Thread aa = new Thread(() -> {
            //判断是不是用户线程
            System.out.println(Thread.currentThread().getName() + "::" + Thread.currentThread().isDaemon());
            while (true) {

            }
        }, "aa");
        //设置守护线程
        aa.setDaemon(true);
        aa.start();
        System.out.println(Thread.currentThread().getName() + "over");
    }
}
